package com.zrx.govern.component.easyexcel.starter.feign;

import com.zrx.govern.component.easyexcel.starter.entity.HttpResult;
import com.zrx.govern.component.easyexcel.starter.feign.entity.DicTreeDto;
import com.zrx.govern.component.easyexcel.starter.feign.config.FeignConfiguration;
import com.zrx.govern.component.easyexcel.starter.feign.interceptor.TokenRelayRequestIntecepor;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

/**
 * 字典接口请求feignclient
 * @author zhangxiaowei
 **/
@FeignClient(contextId = "IDictionaryFeignClientService", name="IDictionaryFeignClientService", url = "${excel.dictionary.api-addr}",configuration =
        {TokenRelayRequestIntecepor.class, FeignConfiguration.class})
public interface IDictionaryFeignClientService {

    /**
     * 流程中心批量获取字典接口
     * @param codes 字典codes
     * @return
     */
    @PostMapping("/feign/getDicByCodeList")
    HttpResult<List<DicTreeDto>> getDictionaryValByCodes(List<String> codes);

}
